package cn.xiaoyaoji.plugin.html;

public class LineWriter
{
  private StringBuffer buffer = new StringBuffer();
  private boolean isFirstChildText = false;
  private boolean isInTextElement = false;
  private static final String IDENT_SPACE = "    ";
  
  public void appendText(String text)
  {
    this.buffer.append(text);
  }
  
  public void newLine()
  {
    this.buffer.append("\n");
  }
  
  public String toString()
  {
    return this.buffer.toString();
  }
  
  public void intoTextParent()
  {
    this.isFirstChildText = true;
    this.buffer.append("    ");
  }
  
  public void outTextParent()
  {
    this.isFirstChildText = true;
  }
  
  public boolean isFirstChildText()
  {
    return this.isFirstChildText;
  }
  
  public void leaveFirstChildText()
  {
    this.isFirstChildText = false;
  }
}
